package com.shyroke.service;

import java.sql.Connection;
import java.sql.Statement;

import org.springframework.stereotype.Service;

import com.shyroke.bean.UserBean;
import com.shyroke.util.DBUtil;

@Service
public class UserSeviceImpl implements UserSevice{

	public void save(UserBean user) {
		try {
			Connection conn=DBUtil.getConn();
			Statement stat=conn.createStatement();
			String sql="insert into users values('"+user.getUserid()+"','"+user.getUsername()+"','"+user.getPassword()+"')";
			stat.executeUpdate(sql);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		
		
	}
	
	
}
